]> dgit.raspbian.org Git - gnome-shell.git/commit
main: Only restore key focus on pop when modal actor is still focused
authorJonas Dreßler <verdre@v0yd.nl>
Sat, 13 Feb 2021 15:16:20 +0000 (16:16 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 29 Jan 2024 23:14:24 +0000 (23:14 +0000)
commit4d544d7b5614cd33bf60c1b610f8b81546955fbb
treeb75fa60199808175a1765065b0ffd7565246ea45
parentde834fe3073c3eafb3fe7feff42d6107f91f1e79
main: Only restore key focus on pop when modal actor is still focused

If something grabs the key focus while a modal is pushed, keeping
key-focus on that actor seems like the smarter thing to do than setting
it back to the last focus after the modal gets popped again. So check if
the key focus actor that we set when pushing the modal got changed when
popping that modal, and if it got changed, simply don't touch key focus.

This fixes a bug with the close dialog, where key focus isn't correctly
set to the dialog after alt-tabbing to a window showing a close dialog.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/786>
js/ui/main.js